package com.example.studentmannage.entity;

public class Student {
    private Integer id;
    private String name;
    private Integer age;
    private Double chinese;
    private Double math;
    private Double english;
    private Double total; // 总分（数据库可不存，Java计算）
    private String className;
    private String avatar;

    // 构造函数
    public Student() {}

    public Student(String name, Integer age, Double chinese, Double math, Double english, String className, String avatar) {
        this.name = name;
        this.age = age;
        this.chinese = chinese;
        this.math = math;
        this.english = english;
        this.total = chinese + math + english;
        this.className = className;
        this.avatar = avatar;
    }

    // Getters and Setters
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public Integer getAge() { return age; }
    public void setAge(Integer age) { this.age = age; }

    public Double getChinese() { return chinese; }
    public void setChinese(Double chinese) { this.chinese = chinese; }

    public Double getMath() { return math; }
    public void setMath(Double math) { this.math = math; }

    public Double getEnglish() { return english; }
    public void setEnglish(Double english) { this.english = english; }

    public Double getTotal() { return chinese + math + english; } // 动态计算

    public String getClassName() { return className; }
    public void setClassName(String className) { this.className = className; }

    public String getAvatar() { return avatar; }
    public void setAvatar(String avatar) { this.avatar = avatar; }
}